video: Allocate the MXSFB framebuffer aligned
authorMarek Vasut <[email protected]>
Tue, 30 Jul 2013 21:37:52 +0000 (23:37 +0200)
committerAnatolij Gustschin <[email protected]>
Fri, 9 Aug 2013 19:48:44 +0000 (21:48 +0200)
Allocate the framebuffer aligned so it can be flushed
and the flush_dcache_range() function won't complain.

Signed-off-by: Marek Vasut <[email protected]>
Cc: Anatolij Gustschin <[email protected]>
Cc: Fabio Estevam <[email protected]>
Cc: Otavio Salvador <[email protected]>
Cc: Stefano Babic <[email protected]>
Acked-by: Stefano Babic <[email protected]>
drivers/video/mxsfb.c

index 6bf9fc5036e351edfd8ee5d4c7276be54fb6d9dd..374c823d064ca137b1954d6dd915c0be04b8d263 100644 (file)
@@ -161,7 +161,8 @@ void *video_hw_init(void)
        panel.memSize = mode.xres * mode.yres * panel.gdfBytesPP;
 
        /* Allocate framebuffer */
-       fb = malloc(panel.memSize);
+       fb = memalign(ARCH_DMA_MINALIGN,
+                     roundup(panel.memSize, ARCH_DMA_MINALIGN));
        if (!fb) {
                printf("MXSFB: Error allocating framebuffer!\n");
                return NULL;